package com.frend.rpc;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.context.request.WebRequest;

@Controller
@SpringBootApplication(exclude = SecurityAutoConfiguration.class)
public class ProcessGetwayApplication {

	private static final Logger logger = LoggerFactory.getLogger(ProcessGetwayApplication.class);

	public static void main(String[] args) {
		SpringApplication.run(ProcessGetwayApplication.class, args);
	}

	/**
	 * 上传附件页面
	 * @return
	 */
	@RequestMapping(value="/index")
	public String index(WebRequest request, Model model) {
		logger.info("contextPath : "+ request.getContextPath());
		model.addAttribute("contextPath",request.getContextPath());
		return "index";
	}

}
